package com.zgz.underwrite.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 险别
 * @author zgz
 *
 */
@Entity
@Table(name="coverage")
public class Coverage implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 565818673369016845L;

	@Id
	@GeneratedValue(generator = "paymentableGenerator")     
	@GenericGenerator(name = "paymentableGenerator", strategy = "assigned")
	private String SCvrgNo;//险别号码
	private String SCvrgNm;//险别名称
 
    
    @ManyToOne( cascade = {CascadeType.PERSIST, CascadeType.MERGE})
    @JoinColumn(name="SProductCde")
    private Product product;//产品


	public void setSCvrgNo(String sCvrgNo) {
		SCvrgNo = sCvrgNo;
	}


	public String getSCvrgNo() {
		return SCvrgNo;
	}


	public void setSCvrgNm(String sCvrgNm) {
		SCvrgNm = sCvrgNm;
	}


	public String getSCvrgNm() {
		return SCvrgNm;
	}


	public void setProduct(Product product) {
		this.product = product;
	}


	public Product getProduct() {
		return product;
	}

	

}
